#ifndef __DRV_QSPI_W25QXX_H_
#define __DRV_QSPI_W25QXX_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include "system.h"

/* export func */

int drv_qspi_w25qxx_init(void);
uint32_t drv_qspi_w25qxx_read_id(void);

void drv_qspi_w25qxx_read(uint32_t addr, uint8_t *pbuf, uint32_t size);
void drv_qspi_w25qxx_write(uint32_t addr, uint8_t *pbuf, uint32_t size);
void drv_qspi_w25qxx_erase_sector(uint32_t sector);
void drv_qspi_w25qxx_erase_chip(void);
void drv_qspi_w25qxx_memory_mapped(void);

uint32_t drv_qspi_w25qxx_get_size(void);


#ifdef __cplusplus
}
#endif

#endif // __DRV_QSPI_W25QXX_H_
